import { create } from 'zustand'
import { persist } from 'zustand/middleware'
import { createListSlice } from './pages/Notice.store'
import { createSettingSlice } from './pages/Setting.store'

export const useStore = create(persist((...a) => ({
  ...createListSlice(...a),
  ...createSettingSlice(...a)
}), {
  name: 'zustand-demo123',
  partialize: (state:any) => {
    return {
      bgColor: state.bgColor
    }
  }
}))
